package com.jytc.framework.po;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * FwRolePermission entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "fw_role_permission")
public class FwRolePermission implements java.io.Serializable {

	// Fields

	private Integer roleMenuId;
	private FwRole fwRole;
	private FwPermission fwPermission;
	private Integer status;

	// Constructors

	/** default constructor */
	public FwRolePermission() {
	}

	/** minimal constructor */
	public FwRolePermission(Integer status) {
		this.status = status;
	}

	/** full constructor */
	public FwRolePermission(FwRole fwRole, FwPermission fwPermission,
			Integer status) {
		this.fwRole = fwRole;
		this.fwPermission = fwPermission;
		this.status = status;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "role_menu_id", unique = true, nullable = false)
	public Integer getRoleMenuId() {
		return this.roleMenuId;
	}

	public void setRoleMenuId(Integer roleMenuId) {
		this.roleMenuId = roleMenuId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "role_id")
	public FwRole getFwRole() {
		return this.fwRole;
	}

	public void setFwRole(FwRole fwRole) {
		this.fwRole = fwRole;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "permission_id")
	public FwPermission getFwPermission() {
		return this.fwPermission;
	}

	public void setFwPermission(FwPermission fwPermission) {
		this.fwPermission = fwPermission;
	}

	@Column(name = "status", nullable = false)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

}